package service;

import entity.Card;
import entity.CountResult;
import entity.Poker;
import entity.Strategy;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.*;

/**
 * 百家乐的大杂烩
 */
@Service
public class BaccaratService {
    public void strategy2335() {
        int lost = 0, win = 0, amount = 0;
        for (int i = 0; i < 10000; i++) {
            Strategy strategy = new Strategy();
            strategy.strategy2335();
            Card card = new Card();
            strategy.run(card.comparePoint());
            System.out.println("金额" + strategy.getAmount() + ">>共" + strategy.getCount() + "次>>输" +
                    strategy.getLost() + ":赢" +
                    strategy.getWin() + ">>峰值:" + strategy.getMax());
            if (strategy.getAmount() >= 5500) {
                win++;
            } else if (strategy.getAmount() <= 2100) {
                lost++;
            }
            amount += strategy.getAmount() - 2100;
        }
        System.out.println("输:" + lost + " 赢:" + win + " 浮动:" + amount);
    }
}
